package exception

type ExceptionInterface interface {
	Error() string
	ECode() ExceptionCode
}

type GeneralException struct {
	err   string
	ecode ExceptionCode
}

func (h GeneralException) Error() string {
	return h.err
}

func (h GeneralException) ECode() ExceptionCode {
	return h.ecode
}

func NewGeneralException(err string, code ExceptionCode) GeneralException {
	return GeneralException{err: err, ecode: code}
}
